﻿using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;

namespace HelloWorld
{
	class HelloWorld
	{
		static void Main(string[] args)
		{
			Stopwatch timer = new Stopwatch();
			timer.Start();

			//Without Tasks
			Console.WriteLine("Fixing Bugs");
			Thread.Sleep(1000);
			
			Console.WriteLine("Fixing Other Bugs");
			Thread.Sleep(1000);
			//End Without	Tasks

			//With Tasks
			//Console.WriteLine("Fixing Bugs");
			//var task = Task.Run(() => Thread.Sleep(1000));

			//Console.WriteLine("Fixing Other Bugs");
			//var task2 = Task.Run(() => Thread.Sleep(1000));

			//task.Wait();
			//task2.Wait();
			//End With	Tasks

			Console.WriteLine("Timer:" + timer.Elapsed);
			Console.ReadKey();

		}

	}
}
